<template>
	<view class="mall-commit-bar">
		<text class="quantity">共{{priceInfo.number}}件,</text>
		<text class="txt">合计:</text>
		<text class="price">¥ {{total}}</text>
		<view class="btn" @click="confirm">提交订单</view>
	</view>
</template>
<script>
	export default {
		methods:{
			confirm(){
				this.$emit("confirm")
			}
		},
		props:{
			priceInfo:Object,
			logFee:Number,
			point:Number
		},
		computed:{
			total(){
				let tem = this.point
				//积分足够
				if(tem>parseFloat(this.priceInfo.point)){
					tem = parseFloat(this.priceInfo.point)
				}
				tem = tem/getApp().globalData.config.pointPer
				//积分抵扣 按比例抵扣
			return	(parseFloat(this.priceInfo.total)+this.logFee - tem).toFixed(2)
			}
		},
		data() {
			return {
				
			};
		}
	}
</script>

<style lang="stylus" lang="stylus">
	.mall-commit-bar
		height 88upx
		background-color white
		display flex
		align-items center
		justify-content flex-end
		.quantity
			color #A1A1A1
			font-size 24upx
		.txt
			font-size 24upx
			color #4E3D07
			margin-right 5upx
		.price
			color #F7895E
			font-size 24upx
			margin-right 20upx
		.btn
			margin-right 20upx
			width:182upx;
			height:60upx;
			background:rgba(247,137,94,1);
			border-radius:30upx;
			color white
			font-size 24upx
			text-align center
			justify-content center
			line-height 60upx
</style>
